package day03.practice.OperDemo1;

public class practice {
    public static void main(String[] args) {
        //第一遍
        /*
        int a = 5, b = 5;
        a--;
        */

        //---------------------------------------------------------

        //第一遍
        /*
        int a = 5, b = 10, c = 5;
        boolean b1 = a > b;
        System.out.println(b1);
        System.out.println(c < b);
        System.out.println(a >= c);
        System.out.println(a <= b);
        System.out.println( a == c);
        System.out.println(a != c);
        */

        //------------------------------------------------------------

        //第一遍:
        /*
        boolean b3 = a > b && c++ > 2;
        System.out.println(b3);
        System.out.println(c);

        boolean b4 = a < b || c++ > 2;
        System.out.println(b4);
        System.out.println(c);
        */

        //第二遍:
        /*
        boolean b3 = a > b && c++ > 2;
        System.out.println(b3);
        System.out.println(c);

        boolean b4 = a < b || c++ > 2;
        System.out.println(b4);
        System.out.println(c);
        */

        //第三遍:
        //boolean b3

        //---------------------------------------------------------------------

        /*
        //第一遍:
        int a = 5;
        a += 10;
        System.out.println(a);
        a *= 2;
        System.out.println(a);
        a /= 6;
        System.out.println(a);

        //第二遍:
        int a = 5;
        a += 10;
        System.out.println(a);
        a *= 2;
        System.out.println(a);
        a /= 6;
        System.out.println(a);

        //第三遍:
        int a = 5;
        a += 10;
        System.out.println(a);
        a *= 2;
        System.out.println(a);
        a /= 6;
        System.out.println(a);
        */

        //-----------------------------------------------------------------

        /*
        System.out.println(10 + 20 + "" + 30);  //3030--------String
        System.out.println("" + 10 + 20 + 30);  //102030--------String
        System.out.println(10 + 20 + 30 + ""); //60--------String
        */

        /*
        //第一遍:
        int num = 5;
        int flag = num > 0 ? 1 : -1;
        System.out.println(flag);

        int a = 8, b = 5;
        int max = a > b ? a : b;
        System.out.println("max=" + max);
        */

        /*
        //第二遍:
        int num = 5;
        int flag = num > 0 ? 1 : -1;
        */

        /*
        //第一遍:
        double price = 300.0;
        if (price >= 500) {
            price *= 0.8;
        }
        System.out.println("最终结算金额为:" + price);

        double score = 555;
        if (score >= 0 && score <= 100) {
            System.out.println(score + "是合法成绩");
        }
        System.out.println("继续执行...");

        //第二遍:
        double price = 300.0;
        if (price >= 500) {
            price *= 0.8;
        }
        System.out.println("最终结算金额为:" + price);
        */

        //----------------------------------------------------------

        //第一遍:
        /*
        double price = 300.0;
        if (price >= 500) {
            price *= 0.8;
        } else {
            price *= 0.9;
        }
        System.out.println("最终结算金额为:" + price);

        double score = 555;
        if (score >= 0 && score <= 100) {
            System.out.println(score + "是合法成绩");
        } else {
            System.out.println(score + "是不合法成绩");
        }
        */

        //第二遍:

        //-----------------------------------------------------------

        /*
        double price = 6000.0;
        if (price >= 2000) {
            price *= 0.5;
        } else if (price >= 1000) {
            price *= 0.7;
        } else if (price >= 500) {
            price *= 0.8;
        } else {
            price *= 0.9;
        }
        System.out.println("最终结算金额为:" + price);
        */

        /*
        double price = 6000.0;
        if (price >= 2000) {
            price *= 0.5;
        } else if (price >= 1000) {
            price *= 0.7;
        } else if (price >= 500) {
            price *= 0.9;
        }
        System.out.println("最终结算金额为:" + price);
        */
    }
}
